/**
 * Copyright (C) 2010 Cloudfarming <info@cloudfarming.nl>
 *
 * Licensed under the Eclipse Public License - v 1.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.eclipse.org/legal/epl-v10.html
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package nl.cloudfarming.sensor;

import java.util.List;

/**
 * A handler can handle a {@link ParsedUnit}
 * Handlers are the last step in the process.
 * Examples of Handlers are: LoggingHandler, StoringHandler.
 *
 * Handlers can be output specific or sensor specific.
 *
 * @author Timon Veenstra
 */
public interface Handler<P extends ParsedUnit> {

    //Can't be generic due to the fact that it wil be asked to handle multiple generic List types
    boolean canHandle(List unit);

    void handle(List<P> unit);
}
